package com.rockcent.mall.lib.domain;


import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by zhangjh on 2016/10/10.
 */
@Table(name = "evaluation")
@Entity
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class Evaluation extends IDEntityMall {
    @Column(columnDefinition = "text comment '评论'")
    private String comment;
    @Column(columnDefinition = "varchar(255) comment '评论用户名'")
    private String commentCustomerName;
    @Column(columnDefinition = "bigint(20) comment '评论用户ID'")
    private Long customerId;
    @Column(columnDefinition = "bit(1) comment '是否匿名'")
    private Boolean isHideName = false;
    @Column(columnDefinition = "bigint(20) comment '商户ID'")
    private Long merchantId;
    @Column(columnDefinition = "bigint(20) comment '产品ID'")
    private Long productId;
    @Column(columnDefinition = "varchar(255) comment '产品名'")
    private String productName ;
    @Column(columnDefinition = "int(11) comment '评价等级 1-5'")
    private Integer rangeStar = 5;
    @Column(columnDefinition = "varchar(255) comment '商家订单号'")
    private String merchantOrderNum;


    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getCommentCustomerName() {
        return commentCustomerName;
    }

    public void setCommentCustomerName(String commentCustomerName) {
        this.commentCustomerName = commentCustomerName;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Boolean getHideName() {
        return isHideName;
    }

    public void setHideName(Boolean hideName) {
        isHideName = hideName;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Integer getRangeStar() {
        return rangeStar;
    }

    public void setRangeStar(Integer rangeStar) {
        this.rangeStar = rangeStar;
    }

    public String getMerchantOrderNum() {
        return merchantOrderNum;
    }

    public void setMerchantOrderNum(String merchantOrderNum) {
        this.merchantOrderNum = merchantOrderNum;
    }

    @Override
    public String toString() {
        return "Evaluation{" +
                "comment='" + comment + '\'' +
                ", id=" + id +
                ", commentCustomerName='" + commentCustomerName + '\'' +
                ", dateCreated=" + dateCreated +
                ", customerId=" + customerId +
                ", isHideName=" + isHideName +
                ", lastUpdated=" + lastUpdated +
                ", merchantId=" + merchantId +
                ", productId=" + productId +
                ", isDelete=" + isDelete +
                ", version=" + version +
                ", productName='" + productName + '\'' +
                ", rangeStar=" + rangeStar +
                ", merchantOrderNum='" + merchantOrderNum + '\'' +
                '}';
    }
}
